﻿
using AutoMapper;
using BCCommon;
using BCCommon.Enums;
using BCDto.Common.Solution.WebsiteSolution;
using BCDto.Common.Solution.WebsiteSolutionItem;
using BCEntity.Common.Solution.WebsiteSolution;
using BCEntity.Common.Solution.WebsiteSolutionItem;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.MapperProfiles.Common.Solution
{
    public class WebsiteSolutionProfile : Profile
    {
        public WebsiteSolutionProfile()
        {
            //官网解决方案
            CreateMap<WebsiteSolutionDto, WebsiteSolutionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionRequestDto, WebsiteSolutionPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionRequestDto, WebsiteSolutionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionPutDto, WebsiteSolutionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionEntity, WebsiteSolutionDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionEntity, WebsiteSolutionViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //官网解决方案项目
            CreateMap<WebsiteSolutionItemDto, WebsiteSolutionItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionItemRequestDto, WebsiteSolutionItemPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionItemRequestDto, WebsiteSolutionItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionItemPutDto, WebsiteSolutionItemEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionItemEntity, WebsiteSolutionItemDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<WebsiteSolutionItemEntity, WebsiteSolutionItemViewDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
        }
    }
}